﻿(function () {
    var o = { exec: function (p) {
        //        url = baseUrl + "/GetSomeData";
        //        $.post(url, function (response) {
        //            alert(response)
        //        });
        var content = '<div style="width:400px;"><table style="width:100%; border:1px solid #000"><tr style="line-height:40px"><td style="width:200px"></td><td style="width:200px"></td></tr> <tr style="line-height:40px"><td style="width:200px"></td><td style="width:200px"></td></tr> <tr style="line-height:40px"><td style="width:200px"></td><td style="width:200px"></td></tr></table></div>';
        CKEDITOR.instances.txtDescription.insertHtml(content);
    }
    };
    CKEDITOR.plugins.add('newplugin', {
        init: function (editor) {
            if (editor.addMenuItems)
                editor.addMenuItem("newplugin", {
                    label: 'New Plugin',
                    icon: this.path + 'newplugin.png',
                    command: 'plugin',
                    group: 'clipboard', order: 9
                });
            if (editor.contextMenu)
                editor.contextMenu.addListener(function () {
                    return { "newplugin": CKEDITOR.TRISTATE_OFF };
                });
            editor.addCommand('plugin', o);
            editor.ui.addButton('newplugin', {
                label: 'newplugin',
                icon: this.path + 'newplugin.png',
                command: 'plugin'
            });
        }
    });
})();